package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.SysCompanyInfoMapper;
import com.ruoyi.system.domain.SysCompanyInfo;
import com.ruoyi.system.service.ISysCompanyInfoService;

/**
 * 企业基本现状Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-09
 */
@Service
public class SysCompanyInfoServiceImpl implements ISysCompanyInfoService 
{
    @Autowired
    private SysCompanyInfoMapper sysCompanyInfoMapper;

    /**
     * 查询企业基本现状
     * 
     * @param deptId
     * @return 企业基本现状
     */
    @Override
    public SysCompanyInfo selectSysCompanyInfoByCompanyId(Long deptId)
    {
        return sysCompanyInfoMapper.selectSysCompanyInfoByCompanyId(deptId);
    }

    /**
     * 查询企业基本现状列表
     * 
     * @param sysCompanyInfo 企业基本现状
     * @return 企业基本现状
     */
    @Override
    public List<SysCompanyInfo> selectSysCompanyInfoList(SysCompanyInfo sysCompanyInfo)
    {
        return sysCompanyInfoMapper.selectSysCompanyInfoList(sysCompanyInfo);
    }

    /**
     * 新增企业基本现状
     * 
     * @param sysCompanyInfo 企业基本现状
     * @return 结果
     */
    @Override
    public int insertSysCompanyInfo(SysCompanyInfo sysCompanyInfo)
    {
        sysCompanyInfo.setCreateTime(DateUtils.getNowDate());
        return sysCompanyInfoMapper.insertSysCompanyInfo(sysCompanyInfo);
    }

    /**
     * 修改企业基本现状
     * 
     * @param sysCompanyInfo 企业基本现状
     * @return 结果
     */
    @Override
    public int updateSysCompanyInfo(SysCompanyInfo sysCompanyInfo)
    {
        sysCompanyInfo.setUpdateTime(DateUtils.getNowDate());
        return sysCompanyInfoMapper.updateSysCompanyInfo(sysCompanyInfo);
    }

    /**
     * 批量删除企业基本现状
     * 
     * @param companyIds 需要删除的企业基本现状主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyInfoByCompanyIds(Long[] companyIds)
    {
        return sysCompanyInfoMapper.deleteSysCompanyInfoByCompanyIds(companyIds);
    }

    /**
     * 删除企业基本现状信息
     * 
     * @param companyId 企业基本现状主键
     * @return 结果
     */
    @Override
    public int deleteSysCompanyInfoByCompanyId(Long companyId)
    {
        return sysCompanyInfoMapper.deleteSysCompanyInfoByCompanyId(companyId);
    }
}
